package com.example.nacosprovider.config;

import org.apache.atlas.AtlasClientV2;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

/**
 * @author ZhangYuan
 * @create 2024/11/14
 * @description
 */
@Configuration
public class AtlasConfig {
    @Value("${atlas.url}")
    private String atlasUrl;

    @Value("${atlas.basicAuthUser}")
    private String basicAuthUser;

    @Value("${atlas.basicAuthPassword}")
    private String basicAuthPassword;

    @Bean
    public AtlasClientV2 atlasClientV2() {
        return new AtlasClientV2(new String[]{atlasUrl}, new String[]{basicAuthUser, basicAuthPassword});
    }


}
